    	function yemian(uid,limit,offset,sele){

			$.ajax({
				url :Server + "/rel/ssi/disServOrderlist",
//				url :"http://localhost/rel/ssi/disServOrderlist",
				data : {
					
					"uid":uid,
					"limit":limit,
					"offset":offset,
					"sele":sele
				},
				type : "POST",
				dataType: "JSON",
				success : function(data) {
					$("#pagination3").pagination({
						currentPage: 1,
						totalPage: Math.ceil(Number(data.total/limit)),
						isShow: true,
						count: 7,
						homePageText: "首页",
						endPageText: "尾页",
						prevPageText: "<上一页",
						nextPageText: "下一页>",
						callback: function(current) {
							infoLikeListofinfo(uid,limit,$("#pagination3").pagination("getPage").current-1);
						}
					});
				}
			});
		}
    	
		function infoLikeListofinfo(uid,limit,offset,sele){
			//<img src="images/usercenter_icon2.png" onclick="delOrder(#99)"/>
//			alert("js1");
			$.ajax({
				url :Server + "/rel/ssi/disServOrderlist",
//				url :"http://localhost/rel/ssi/disServOrderlist",
				data : {
					"uid":uid,
					"limit":limit,
					"offset":offset,
					"sele":sele
				},
				type : "POST",
				dataType: "JSON",
				success : function(data) {
					var html = "";
					var item = "";
					var pattern = '<li> \
						<div class="row1">\
					<div>\
						<span>#2</span>\
						<span>订单编号: #3</span>\
					</div>\
					<div></div>\
				</div>\
				<div class="row2">\
					<div class="tab1"><img src="images/#0" /></div>\
					<div class="tab2">#1</div>\
					<div class="tab3">#4</div>\
					<div class="tab4">#6</div>\
					<div class="tab5">\
						<p id="status">#11</p>\
						<p>\
							<a onclick="findDetail(#88,#33)">查看详情</a>\
						</p>\
					</div>\
					<div class="tab6">\
						<div class="btn">\
							<a onclick="doManage(#87,#32)">#22</a>\
						</div>\
						<div class="time"></div>\
					</div>\
				</div>\
			</li>';
					
					for (var i = 0; i < data.rows.length; i++) {
						Status = "";
						Status1 = "";
						switch (data.rows[i].appointOrder.status) {
						case 0:
							Status = "待确定";
							Status1 = "确定";
							break;
						case 1:
							Status = "待支付";
							Status1 = "";
							break;
						case 2:
							Status = "已支付";
							Status1 = "";
							break;
						case 3:
							Status = "待确定";
							Status1 = "确定";
							break;
						case 4:
							Status = "待试验";
							Status1 = "";
							break;
						case 5:
							Status = "已完成";
							Status1 = "评价";
							break;
						case 6:
							Status = "已评价";
							Status1 = "";
							break;
						case 7:
							Status = "已关闭";
							Status1 = "";
							break;
						}
						
							item = pattern	
								.replace("#88", data.rows[i].serviceId)//服务id
								.replace("#87", data.rows[i].serviceId)//服务id
								.replace("#99", data.rows[i].appointOrder.id)//订单id
								.replace("#98", data.rows[i].appointOrder.id)//订单id
								.replace("#0", data.rows[i].ssimagelist.imagePath)//图片
								.replace("#1", data.rows[i].serviceName)//服务名
								.replace("#2", new Date(data.rows[i].appointOrder.createTime).Format("yyyy-MM-dd hh:mm:ss")) //订单开始时间
								.replace("#3", data.rows[i].appointOrder.number)//订单编号
								.replace("#4", data.rows[i].appointOrder.payment)//费用
//								.replace("#5", data.rows[i].appointOrder.status)//交易状态
//								.replace("#77", data.rows[i].appointOrder.id)//交易状态
								.replace("#6", data.rows[i].contacts)//服务负责人
								.replace("#11", Status)//订单状态
								.replace("#22", Status1)//操作订单状态
								.replace("#33", data.rows[i].appointOrder.id)//进行操作
								.replace("#32", data.rows[i].appointOrder.id)//进行操作
							html += item;
							if(Status1==null || Status1==''||Status1=="")
								$("#manage").remove();
					}
//					alert(data.rows[i].appointOrder.createTime);
					$("#orderList").html(html);
//					$("#lb li").each(function(i){
//				 			if(tradeId==$(this).attr("val")){
//				 				$("#status").eq(0).removeClass('selected');
//						 		$(this).addClass('selected');
//					 			}
//					});
					
				},
			});
		}

		$(document).ready(function(){
			loadP();
//			$("#searchofinfo").click(function(){
//				$(location).attr('href', 'newfile17?string=' + $("#likeStringofinof").val() + '');
//			});
	});

//		function delOrder(oid){
//			var r=confirm("确定要删除吗？");
//			if(r==true){
//				$.ajax({
//					url :Server + "/orderRelevant/deleteOrder",
////					url :"http://localhost/orderRelevant/deleteOrder",
//					data : {
//						"id":oid
//					},
//					type : "POST",
//					//dataType: "JSON",
//					success : function(data) {
//						alert(data);
//						//yemian(orderStatus);
//						loadSO();
//					},
//				});	
//			}
//		}
		
		Date.prototype.Format = 
			function(fmt){
			var o = {
				"M+": this.getMonth() + 1, //月份 
       			"d+": this.getDate(), //日 
        		"h+": this.getHours(), //小时 
        		"m+": this.getMinutes(), //分 
        		"s+": this.getSeconds(), //秒 
        		"q+": Math.floor((this.getMonth() + 3) / 3), //季度 
        		"S": this.getMilliseconds() //毫秒 
			};
			if(/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
			for(var k in o)
			if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    		return fmt;
		}
		function findDetail(serviceId,oid){
			$(location).attr('href', 'service_public24_2?serviceId='+serviceId+''+'&oid='+oid+'');
		}
		
		function doManage(serviceId,oid){
			$(location).attr('href', 'service_public24_2?serviceId='+serviceId+''+'&oid='+oid+'');
		}
		function loadP(){
			//获取uid
				var uid = $("#useridoflogin").val();
//				var uid = 23;
				var limit = 6;
				var offset = 0;
				var sele = $("#sun_time option:selected").val();
				yemian(uid,limit,offset,sele);
				infoLikeListofinfo(uid,limit,offset,sele);
		}
//		function ChangeStatus(oid,status){
//			$.ajax({
//				url :"http://localhost/rel/ssi/changeStatus",
//				url : Server +"/rel/ssi/changeStatus",
//				data : {
//					"oid" : oid,
//					"status" : status
//				},
//				type : "POST",
//				dataType : "text",
//				success : function(data) {
//					alert("操作成功");
//					loadP();
//				},
//				error : function(msg) {
//					alert("操作失败");
//					loadP();
//				}
//			})
//		}
